Page({
  data: {
    indicatorDots: true,
    autoplay:false,
    interval: 2000,
    duration:300,
    background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
  },
  // current 改变时会触发 change 事件，event.detail = {current, source}
  change(e) {
    console.log(e)
  },
  // 动画结束时会触发 animationfinish 事件，event.detail = {current, source}
  animationfinish(e) {
    console.log(e)
  },
  changeIndicatorDots(e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay(e) {
    this.setData({
      changeAutoplay: !this.changeAutoplay
    })
  },
  durationChanng(e) {
    this.setData({
      duration: e.detail.value
    })
  },
  intervalChanng(e) {
    this.setData({
      interval: e.detail.value
    })
  }
})